package com.chenfan.filestore.exception;

import com.chenfan.ccp.common.result.IResultCode;
import lombok.Getter;

/**
 * @author K
 * @date 2021-06-04
 */
public enum FileStoreCode implements IResultCode {
    /**
     * 传入的文件不能为空
     */
    FILEID_CANNOT_BE_NULL(3500001, "传入的文件不能为空"),
    /**
     * 超过设定的阈值
     */
    FILE_QUANTITY_OVER_THRESHOLD(3500002, "超过设定的阈值50" + ", 请进行分片再进行操作"),
    /**
     * 请传入正确的Bucket
     */
    BUCKET_ERROR(3500003, "请传入正确的Bucket"),


    /**
     * 传入的文件不能为空
     */
    PDF_WATERMARK_WORDS_NOT_NULL(3500004, "水印文字不能为空"),

    /**
     * 文件不存在
     */
    FILE_NOT_EXIST(3500005, "文件id对应文件不存在"),
    /**
     * pdf merge fail
     */
    PDF_MERGE_FAIL(3500006, "pdf merge fail"),
    /**
     * illegal_file_name
     */
    ILLEGAL_FILE_NAME(3500007, "illegal_file_name"),
    /**
     * fileIds can't be empty
     */
    FILE_IDS_IS_EMPTY(3500008, "file_ids_is_empty"),

    /**
     * 文件后缀与原有文件格式不匹配
     */
    FILE_EXTENTION_NOTMATCH(3500009, "文件后缀与原有文件格式不匹配"),


    /**
     * 读取文件失败
     */
    FILE_READ_FAILED(3500010, "读取文件失败"),

    TEMPLATE_CODE_EXISTS(3500011, "模板Code已存在"),

    TEMPLATE_DOES_NOT_EXISTS(3500012, "模板不存在"),

    STATUS_NOT_CHANGE(3500013, "状态已为目标状态,无需更改"),

    TASK_CREATE_EXPORT_ERROR(3500014, "创建导出任务失败"),

    TEMPLATE_EXPAIN_FAILED(3500015, "模板解析失败"),

    IMPORT_TASK_CREATE_ERROR(3500015, "创建导入任务失败"),

    BASE_PRINT_TEMPLATE_URL_WRONG(3500016, "关联接口地址配置错误"),

    BASE_PRINT_TEMPLATE_BUSINESS_ERROR(3500017, "业务服务有误"),

    FILE_PATH_NOT_RIGHT(3500018, "文件路径格式不对"),

    FILE_FORCE_UPLOAD_FAIL(3500019, "文件上传有误"),
    WORD_PDF_ERROR(3500020, "word转换Pdf异常"),
    TIME_LIMIT(3500021, "带图导出请间隔一段时间"),
    BATCH_IMAGE_NUM_LIMIT(3500022, "带图导出明细超过2000条限制"),
    ;
    @Getter
    private int code;
    @Getter
    private String message;

    FileStoreCode(final int code, final String message) {
        this.code = code;
        this.message = message;
    }
}
